//
//  WebViewVC.m
//  TestUrlDemo
//
//  Created by huangwei on 16/6/30.
//  Copyright © 2016年 天翼阅读. All rights reserved.
//

#import "WebViewVC.h"

@interface WebViewVC ()

@property(nonatomic,copy)NSString *urlString;

@end

@implementation WebViewVC

-(id)initWithUrlString:(NSString*)urlStr{

    self=[super init];
    
    if (self) {
        self.urlString=urlStr;
    }
    return self;

}
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title=@"URL界面";
    
    UIWebView *webView=[[UIWebView alloc]initWithFrame:self.view.frame];
    webView.backgroundColor=[UIColor clearColor];
    [self.view addSubview:webView];
    NSURLRequest *urlRequest=[[NSURLRequest alloc]initWithURL:[NSURL URLWithString:self.urlString]];
    [webView loadRequest:urlRequest];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
